__author__ = 'mars'
import struct
f1=open("f:/6.txt",'r').read()

f2=f1.split(' ')
print len(f2)
print 'tagVK_HEADER'
print f2[0:4]
print 'messageSize'
print f2[4:6]
print 'protocolMajor'
print f2[6:7]
print 'protocolMinor'
print f2[7:8]
print 'encodeMajor'
print f2[8:9]
print 'encodeMinor'
print f2[9:10]
print 'messageType'
print f2[10:11]
print 'compressionStatus'
print f2[11:12]
print 'sequenceNo'
print f2[12:16]
print 'AppType'
print f2[16:17]
print 'CmdSub'
print f2[17:18]
print 'ReplyID'
print f2[18:20]
print 'ValidSize'
print f2[20:22]
print 'TermID'
print f2[22:29]
print 'RouteID'
print f2[34:42]
print 'OrgID'
print f2[42:58]
print 'DispatchClientID'
print f2[58:66]
print 'ServerTimeHHMMSS'
print f2[66:74]
print 'v'
print f2[74:90]
print 'f'
print f2[90:106]
print f2[106:108]
print "-----------------"
print 'area'
print f2[110:118]
print 'car id'
print f2[118:126]
b2=''
for b1 in f2[118:126]:
    b2 += b1
print b2.decode("hex")
print 'sim'
print f2[126:142]
b2=''
for b1 in f2[126:142]:
    b2 += b1
print b2.decode("hex")
print 'line id'
print f2[142:150]
print 'type'
print f2[150:156]
print 'file type'
print f2[156:157]
print 'len'
print f2[157:161]
print 'dir'
print f2[161:]
print len(f2[161:])

b2=''
for b1 in f2[161:219]:
    b2 += b1

print b2.decode("hex")

